/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxline.model;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;

/**
 *
 * @author ely
 */
@Entity
public class Stamp implements Serializable {

    @Id
    @SequenceGenerator(sequenceName = "seq_stamp", name = "seq_stamp", allocationSize = 1)
    @GeneratedValue(generator = "seq_stamp", strategy = GenerationType.SEQUENCE)
    private Long id;
    private String serie;
    private Integer number;
    @OneToOne
    private TypeStamp typeStamp;

    public Stamp() {
    }

    public Stamp(Long id, String serie, Integer number, TypeStamp typeStamp) {
        this.id = id;
        this.serie = serie;
        this.number = number;
        this.typeStamp = typeStamp;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSerie() {
        return serie;
    }

    public void setSerie(String serie) {
        this.serie = serie;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public TypeStamp getTypeStamp() {
        return typeStamp;
    }

    public void setTypeStamp(TypeStamp typeStamp) {
        this.typeStamp = typeStamp;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 11 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Stamp other = (Stamp) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Stamp{" + "id=" + id + ", serie=" + serie + ", number=" + number + ", typeStamp=" + typeStamp + '}';
    }
    
    
    


}
